<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">




<title>Log4net日志记录组件-学习心得 - shy - 博客园</title>
<meta name="keywords" content=".NET">
<meta name="description" content="Log4net主要由五个部分组成，分别为Logger，Appenders, Filters, Layouts 和Object Renders。">



<link title="RSS" type="application/rss+xml" rel="alternate" href="http://www.cnblogs.com/shyblog/rss">
<link title="RSD" type="application/rsd+xml" rel="EditURI" href="http://www.cnblogs.com/shyblog/rsd.xml"> 
  



<link rel="stylesheet" type="text/css" href="index.css" media="all">
</head>
<body>
    <form name="Form1" method="post" action="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html" id="Form1">
<div>
<input name="__EVENTTARGET" id="__EVENTTARGET" value="" type="hidden">
<input name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" type="hidden">
<input name="__VIEWSTATE" id="__VIEWSTATE" value="" type="hidden">
</div>




        
<table class="Framework" cellpadding="0" cellspacing="0" width="100%">
	<tbody><tr>
		<td colspan="3">
			
<div id="top">
<table cellpadding="10" cellspacing="0">
	<tbody><tr>
		<td nowrap="nowrap">
			<h1><a id="Header1_HeaderTitle" class="headermaintitle" href="http://www.cnblogs.com/shyblog/">shy</a></h1>
			科技由你创新 未来任你掌握
		</td>
	</tr>
</tbody></table>
</div>
<div id="sub">
	<div id="sub-right">
<div class="BlogStats">posts - 9, comments - 21, trackbacks - 1, articles - 1</div></div>
	
&nbsp;
<a id="Header1_MyLinks1_HomeLink" href="http://www.cnblogs.com/">博客园</a>&nbsp;::
<a id="Header1_MyLinks1_MyHomeLink" href="http://www.cnblogs.com/shyblog/">首页</a>&nbsp;::
<a id="Header1_MyLinks1_NewPostLink" href="http://www.cnblogs.com/shyblog/admin/EditPosts.aspx?opt=1">新随笔</a>&nbsp;::
<a id="Header1_MyLinks1_ContactLink" accesskey="9" href="http://space.cnblogs.com/msg/send/suhanyu">联系</a>&nbsp;::
<a id="Header1_MyLinks1_Syndication" href="http://www.cnblogs.com/shyblog/rss">订阅</a>
<a id="Header1_MyLinks1_XMLLink" class="XMLLink" href="http://www.cnblogs.com/shyblog/rss"><img src="xml.gif" alt="订阅" style="border-width: 0px;"></a>&nbsp;::
<a id="Header1_MyLinks1_Admin" href="http://www.cnblogs.com/shyblog/admin/EditPosts.aspx">管理</a>

</div>
		</td>
	</tr>
	<tr>
		<td class="LeftCell">
			<div id="leftmenu">
	
		
<div id="Cal">
<img src="icon-group.jpg" align="left" hspace="5" vspace="2"><h3>日历</h3>
<table id="Calendar1_entryCal" class="cal" title="Calendar" style="border-width: 0px; height: 160px; border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0">
	<tbody><tr><td colspan="7" style="background-color: rgb(238, 238, 238);"><table class="cal" style="color: rgb(102, 102, 102); font-size: 13px; font-weight: bold; width: 100%; border-collapse: collapse;" border="0" cellspacing="0">
		<tbody><tr><td style="width: 15%;" valign="bottom"><a href="javascript:__doPostBack('Calendar1$entryCal','V3196')" style="color: Black;" title="Go to the previous month">&lt;</a></td><td style="width: 70%;" align="center">2008年11月</td><td style="width: 15%;" align="right" valign="bottom"><a href="javascript:__doPostBack('Calendar1$entryCal','V3257')" style="color: Black;" title="Go to the next month">&gt;</a></td></tr>
	</tbody></table></td></tr><tr><th abbr="日" scope="col" style="background-color: rgb(221, 221, 204); font-size: 12px;" align="center">日</th><th abbr="一" scope="col" style="background-color: rgb(221, 221, 204); font-size: 12px;" align="center">一</th><th abbr="二" scope="col" style="background-color: rgb(221, 221, 204); font-size: 12px;" align="center">二</th><th abbr="三" scope="col" style="background-color: rgb(221, 221, 204); font-size: 12px;" align="center">三</th><th abbr="四" scope="col" style="background-color: rgb(221, 221, 204); font-size: 12px;" align="center">四</th><th abbr="五" scope="col" style="background-color: rgb(221, 221, 204); font-size: 12px;" align="center">五</th><th abbr="六" scope="col" style="background-color: rgb(221, 221, 204); font-size: 12px;" align="center">六</th></tr><tr><td style="color: Gray; font-size: 11px; width: 14%;" align="center">26</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">27</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">28</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">29</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">30</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">31</td><td style="font-size: 11px; width: 14%;" align="center">1</td></tr><tr><td style="font-size: 11px; width: 14%;" align="center">2</td><td style="font-size: 11px; width: 14%;" align="center">3</td><td style="font-size: 11px; width: 14%;" align="center">4</td><td style="font-size: 11px; width: 14%;" align="center">5</td><td style="font-size: 11px; width: 14%;" align="center">6</td><td style="font-size: 11px; width: 14%;" align="center">7</td><td style="font-size: 11px; width: 14%;" align="center">8</td></tr><tr><td style="font-size: 11px; width: 14%;" align="center">9</td><td style="font-size: 11px; width: 14%;" align="center">10</td><td style="font-size: 11px; width: 14%;" align="center">11</td><td style="font-size: 11px; width: 14%;" align="center">12</td><td style="font-size: 11px; width: 14%;" align="center">13</td><td style="font-size: 11px; width: 14%;" align="center">14</td><td style="font-size: 11px; width: 14%;" align="center">15</td></tr><tr><td style="font-size: 11px; width: 14%;" align="center">16</td><td style="font-size: 11px; width: 14%;" align="center">17</td><td style="font-size: 11px; width: 14%;" align="center"><a href="http://www.cnblogs.com/shyblog/archive/2008/11/18.html"><u>18</u></a></td><td style="font-size: 11px; width: 14%;" align="center"><a href="http://www.cnblogs.com/shyblog/archive/2008/11/19.html"><u>19</u></a></td><td style="font-size: 11px; width: 14%;" align="center">20</td><td style="font-size: 11px; width: 14%;" align="center">21</td><td style="font-size: 11px; width: 14%;" align="center">22</td></tr><tr><td style="font-size: 11px; width: 14%;" align="center">23</td><td style="font-size: 11px; width: 14%;" align="center">24</td><td style="font-size: 11px; width: 14%;" align="center">25</td><td style="font-size: 11px; width: 14%;" align="center">26</td><td style="font-size: 11px; width: 14%;" align="center">27</td><td style="font-size: 11px; width: 14%;" align="center">28</td><td style="font-size: 11px; width: 14%;" align="center">29</td></tr><tr><td style="font-size: 11px; width: 14%;" align="center">30</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">1</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">2</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center"><a href="http://www.cnblogs.com/shyblog/archive/2008/12/3.html"><u>3</u></a></td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">4</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">5</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">6</td></tr>
</tbody></table>
</div>

		
<div id="cell">
<img src="icon-group.jpg" align="left" hspace="5" vspace="2"><h3>公告</h3>
<div id="news">
	<div id="profile_block"><a href="http://home.cnblogs.com/shyblog/" target="_top">我的主页</a>&nbsp; <a href="http://home.cnblogs.com/shyblog/detail/" target="_top">个人资料</a><br><a href="http://home.cnblogs.com/shyblog/ing/" target="_top">我的闪存</a>&nbsp; <a href="http://space.cnblogs.com/msg/send/suhanyu" target="_top">发短消息</a></div>
</div>
</div>

	
	

<div id="cell">
<img src="icon-group.jpg" align="left" hspace="5" vspace="2">
<h3 class="catListTitle">搜索</h3>
<div class="div_my_zzk"><input value="" id="q" onkeydown="return zzk_go_enter(event);" class="input_my_zzk" type="text">&nbsp;<input onclick="zzk_go()" value="找找看" id="btnZzk" class="btn_my_zzk" type="button"></div>
<div class="div_my_zzk"><input value="" name="google_q" id="google_q" onkeydown="return google_go_enter(event)" class="input_my_zzk" type="text">&nbsp;<input onclick="google_go()" value="Google搜索" class="btn_my_zzk" type="button"></div>
</div>
<div class="ad_side">
<ul style="margin-left: 0px;"><li>
<div>

<ins style="border: medium none ; margin: 0pt; padding: 0pt; display: inline-table; height: 150px; position: relative; visibility: visible; width: 180px;"><ins style="border: medium none ; margin: 0pt; padding: 0pt; display: block; height: 150px; position: relative; visibility: visible; width: 180px;"><iframe allowtransparency="true" hspace="0" id="google_ads_frame3" marginheight="0" marginwidth="0" name="google_ads_frame" src="index_1.html" style="left: 0pt; position: absolute; top: 0pt;" vspace="0" scrolling="no" frameborder="0" height="150" width="180"></iframe></ins></ins>
</div></li></ul>
</div>
<div id="cell">
<img src="icon-group.jpg" align="left" hspace="5" vspace="2">
<h3>常用链接</h3>
<ul>

		<li><a id="Singlecolumn2_ctl03_rptMainLinks_ctl00_lnkLinkItem" href="http://www.cnblogs.com/shyblog/MyPosts.html">我的随笔</a></li>
	
		<li><a id="Singlecolumn2_ctl03_rptMainLinks_ctl01_lnkLinkItem" href="http://home.cnblogs.com/shyblog/">我的空间</a></li>
	
		<li><a id="Singlecolumn2_ctl03_rptMainLinks_ctl02_lnkLinkItem" href="http://space.cnblogs.com/msg/recent">我的短信</a></li>
	
		<li><a id="Singlecolumn2_ctl03_rptMainLinks_ctl03_lnkLinkItem" href="http://www.cnblogs.com/shyblog/MyComments.html">我的评论</a></li>
	
<li><a id="itemListLink" onclick="this.blur();WarpClass('itemListLink', 'itemListLin_con');return false;" href="#">更多链接</a></li>
</ul>
<div id="itemListLin_con" style="display: none;">
<ul>
		<li><a id="Singlecolumn2_ctl03_repeaterLinks_ctl01_lnkLinkItem" href="http://www.cnblogs.com/shyblog/OtherPosts.html">我的参与</a></li>
	
		<li><a id="Singlecolumn2_ctl03_repeaterLinks_ctl02_lnkLinkItem" href="http://www.cnblogs.com/shyblog/MyNews.html">我的新闻</a></li>
	
		<li><a id="Singlecolumn2_ctl03_repeaterLinks_ctl03_lnkLinkItem" href="http://www.cnblogs.com/shyblog/RecentComments.html">最新评论</a></li>
	
		<li><a id="Singlecolumn2_ctl03_repeaterLinks_ctl04_lnkLinkItem" href="http://www.cnblogs.com/shyblog/tag/">我的标签</a></li>
	</ul>
</div>
</div>
<div id="cell">
<img src="icon-group.jpg" align="left" hspace="5" vspace="2">
<h3>我的标签</h3>
<div id="MyTag">
<ul>
<li><a href="http://www.cnblogs.com/shyblog/tag/Asp%ef%bf%a5net/">Asp.net(4)</a></li><li><a href="http://www.cnblogs.com/shyblog/tag/GridView/">GridView(3)</a></li><li><a href="http://www.cnblogs.com/shyblog/tag/%e6%9d%82%e8%b0%88/">杂谈(1)</a></li><li><a href="http://www.cnblogs.com/shyblog/tag/%ef%bf%a5NET/">.NET(1)</a></li><li><a href="http://www.cnblogs.com/shyblog/tag/AJAX/">AJAX(1)</a></li><li><a href="http://www.cnblogs.com/shyblog/tag/%e7%a7%91%e6%8a%80%e6%97%a5/">科技日(1)</a></li>
</ul>
</div>
</div>
		<div id="cell">
		<img src="icon-group.jpg" align="left" hspace="5" vspace="2"><h3>随笔分类</h3>
		
				<ul>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl00_LinkList_ctl01_RssLink" title="Subscribe to 转载(1)" href="http://www.cnblogs.com/shyblog/category/164110.html/rss"><img title="Subscribe to 转载(1)" src="xmlsmall.gif" style="border-width: 0px;"></a><a id="Singlecolumn2_Categories_CatList_ctl00_LinkList_ctl01_Link" href="http://www.cnblogs.com/shyblog/category/164110.html">转载(1)</a>
				</li>
			
				</ul>
			</div>
	
		<div id="cell">
		<img src="icon-group.jpg" align="left" hspace="5" vspace="2"><h3>随笔档案</h3>
		
				<ul>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl01_Link" href="http://www.cnblogs.com/shyblog/archive/2009/01.html">2009年1月 (1)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl02_Link" href="http://www.cnblogs.com/shyblog/archive/2008/12.html">2008年12月 (1)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl03_Link" href="http://www.cnblogs.com/shyblog/archive/2008/11.html">2008年11月 (7)</a>
				</li>
			
				</ul>
			</div>
	
		<div id="cell">
		<img src="icon-group.jpg" align="left" hspace="5" vspace="2"><h3>新闻分类</h3>
		
				<ul>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl02_LinkList_ctl01_RssLink" title="Subscribe to 财经" href="http://www.cnblogs.com/shyblog/category/164099.html/rss"><img title="Subscribe to 财经" src="xmlsmall.gif" style="border-width: 0px;"></a><a id="Singlecolumn2_Categories_CatList_ctl02_LinkList_ctl01_Link" href="http://www.cnblogs.com/shyblog/category/164099.html">财经</a>
				</li>
			
				</ul>
			</div>
	
		<div id="cell">
		<img src="icon-group.jpg" align="left" hspace="5" vspace="2"><h3>新闻档案</h3>
		
				<ul>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl03_LinkList_ctl01_Link" href="http://www.cnblogs.com/shyblog/news/2008/11.html">2008年11月 (1)</a>
				</li>
			
				</ul>
			</div>
	
		<div id="cell">
		<img src="icon-group.jpg" align="left" hspace="5" vspace="2"><h3>相册</h3>
		
				<ul>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl04_LinkList_ctl01_Link" href="http://www.cnblogs.com/shyblog/gallery/164056.html">长江七号</a>
				</li>
			
				</ul>
			</div>
	
		<div id="cell">
		<img src="icon-group.jpg" align="left" hspace="5" vspace="2"><h3>MY友情网站</h3>
		
				<ul>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl05_LinkList_ctl01_Link" href="http://youwing.com/" target="_top">毕业生网站</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl05_LinkList_ctl02_Link" href="http://chinastockadvice.com/" target="_top">中华证券资讯网</a>
				</li>
			
				</ul>
			</div>
	

<div id="cell">
<img src="icon-group.jpg" align="left" hspace="5" vspace="2"><h3>最新评论
	<a id="Singlecolumn2__41ae9766d9b8_RSSHyperlink1" href="http://www.cnblogs.com/shyblog/CommentsRSS.aspx"><img src="xml.gif" style="border-width: 0px;"></a></h3>
<div class="RecentComment">
	
			<ul>
		
			<li style="">
				<a id="Singlecolumn2__41ae9766d9b8_CommentList_ctl01_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/19/1336580.html#1486036">1.&nbsp;re: AjaxPro实现无刷新模仿MSN提示消息功能</a>
			</li>
			<li style="">
				&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="MessageShow.aspx...
			</li>
			<li style="text-align: right; margin-right: 4px;">
				--soarfe</li>
		
			<li style="">
				<a id="Singlecolumn2__41ae9766d9b8_CommentList_ctl02_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#1384144">2.&nbsp;re: Log4net日志记录组件-学习心得</a>
			</li>
			<li style="">
				博主的下载链接是错的哈，应该是
log4net好像很久没发布新版本了，目前最新的版本是1.2.10 ，
看源代码好像是基于.net framework 1.1 写的，用vs2005打开解决方案的时候，...
			</li>
			<li style="text-align: right; margin-right: 4px;">
				--Cheese</li>
		
			<li style="">
				<a id="Singlecolumn2__41ae9766d9b8_CommentList_ctl03_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#1380242">3.&nbsp;re: Log4net日志记录组件-学习心得</a>
			</li>
			<li style="">
				如何动态更改日志文件输出路径.
<br>通常应用程序都会有个日志输出路径供用户配置.
<br>这个在log4net如何实现?
			</li>
			<li style="text-align: right; margin-right: 4px;">
				--XMLSpy</li>
		
			<li style="">
				<a id="Singlecolumn2__41ae9766d9b8_CommentList_ctl04_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/19/1336782.html#1376040">4.&nbsp;re: 支付模块提交xml数据</a>
			</li>
			<li style="">
				恩,写的过于简单了
			</li>
			<li style="text-align: right; margin-right: 4px;">
				--xjb</li>
		
			<li style="">
				<a id="Singlecolumn2__41ae9766d9b8_CommentList_ctl05_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#1375992">5.&nbsp;re: Log4net日志记录组件-学习心得</a>
			</li>
			<li style="">
				我觉得挺好的，现在正在学习中……
			</li>
			<li style="text-align: right; margin-right: 4px;">
				--鹏鹏_Lovely</li>
		
			</ul>
		
</div>
</div>

<div id="cell">
<img src="icon-group.jpg" align="left" hspace="5" vspace="2"><h3>阅读排行榜</h3>
<div class="RecentComment">
	
			<ul style="">
		
			<li>
				<a id="Singlecolumn2__1d75c0c4b129_TopList_ctl01_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html">1.&nbsp;Log4net日志记录组件-学习心得(2502)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__1d75c0c4b129_TopList_ctl02_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/19/1336782.html">2.&nbsp;支付模块提交xml数据(1748)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__1d75c0c4b129_TopList_ctl03_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1335693.html">3.&nbsp;TabContainer动态添加TabPanel,TabPanel动态添加HeaderTemplate,ContentTemplate(878)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__1d75c0c4b129_TopList_ctl04_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2009/01/15/1376214.html">4.&nbsp;gridview 绑定数据源 SqlDataSource 实现增加修改删除功能(547)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__1d75c0c4b129_TopList_ctl05_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1335975.html">5.&nbsp;GridView中超链接的使用(292)</a>
			</li>
		
			</ul>
		
</div>
</div>

<div id="cell">
<img src="icon-group.jpg" align="left" hspace="5" vspace="2"><h3>评论排行榜</h3>
<div class="RecentComment">
	
			<ul style="">
		
			<li>
				<a id="Singlecolumn2__36493206242a_TopList_ctl01_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html">1.&nbsp;Log4net日志记录组件-学习心得(14)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__36493206242a_TopList_ctl02_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/19/1336782.html">2.&nbsp;支付模块提交xml数据(5)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__36493206242a_TopList_ctl03_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/19/1336580.html">3.&nbsp;AjaxPro实现无刷新模仿MSN提示消息功能(1)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__36493206242a_TopList_ctl04_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1335693.html">4.&nbsp;TabContainer动态添加TabPanel,TabPanel动态添加HeaderTemplate,ContentTemplate(1)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__36493206242a_TopList_ctl05_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1335625.html">5.&nbsp;Sun科技日 -北京 (0)</a>
			</li>
		
			</ul>
		
</div>
</div>

</div>
		</td>
		<td class="MainCell">
			<div id="main">
				
					
	<div class="post">
		<div class="posthead">
			<h2>
				<a id="ctl03_TitleUrl" class="singleposttitle" href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html">Log4net日志记录组件-学习心得</a>
			</h2>
 			Posted on 2008-11-18 16:15 <a href="http://www.cnblogs.com/shyblog/">suhanyu</a> 阅读(2502) <a href="#commentform">评论(14)</a> &nbsp;<a href="http://www.cnblogs.com/shyblog/admin/EditPosts.aspx?postid=1336052">编辑</a> <a href="http://www.cnblogs.com/shyblog/AddToFavorite.aspx?id=1336052">收藏</a> <a href="#" onclick="PutInWz();return false;">网摘</a>  
			<img src="1336052.html" height="1" width="1">
			
<!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
<rdf:Description
rdf:about="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html"
dc:identifier="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html"
dc:title=""
trackback:ping="http://www.cnblogs.com/shyblog/services/trackbacks/1336052.aspx" />
</rdf:RDF>
-->

		</div>
		<div class="postbody"><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 最近正在做一个大型网站，网站已经基本成型，到了后期维护和修改的阶段，经常会遇到某些页面打不开的状态，出现了未知的错误，回头想想，还是日志做的不详细，跟踪的不彻底，在网上搜了搜，找到了一个不错的关于.net 日志记录组件的文章，也是博客园的用户，也转载下，好好学习学习，然后应用到我的网站上。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; </p>
<p>一&nbsp;Log4net简介</p>
<p>Log4net是基于.net开发的一款非常著名的记录日志开源组件。他最早是2001年7月由NeoWorks&nbsp;Limited启动的项目，基本的框架源于另外的一个非常著名的姐妹组件－log4j。Log4net记录日志的功能非常强大。它可以将日志分不同的等级，比不同的样式，将日志输出到不同的媒介。</p>
<p>Log4net可以从<a href="http://logging.apache.org/log4net/downloads.html">http://logging.apache.org/log4net/downloads.html</a>网站下载最新版本。</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>二&nbsp;Log4net核心组成</p>
<p>Log4net主要由五个部分组成，分别为Logger，Appenders,&nbsp;Filters,&nbsp;Layouts&nbsp;和Object&nbsp;Renders。</p>
<p>&nbsp;</p>
<p>一）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Logger(日志)</p>
<p>&nbsp;</p>
<p>1．&nbsp;记录日志的分类：</p>
<p>Log4net能够以多种方式输出日志。支持的日志输出常用的主要媒介有数据库（包括MS&nbsp;SQL&nbsp;Server,&nbsp;Access,&nbsp;Oracle9i,Oracle8i,DB2,SQLite，控制台，文件，事件日志(可以用事件查看器查看)和邮件等多种方式。</p>
<p>&nbsp;</p>
<p>2．&nbsp;日志的级别</p>
<p>Log4net支持多种级别的日志。优先级从高到低依次排列如下:</p>
<p>FATAL&nbsp;&gt;&nbsp;ERROR&nbsp;&gt;&nbsp;WARN&nbsp;&gt;&nbsp;INFO&nbsp;&gt;&nbsp;DEBUG</p>
<p>此外还有ALL（允许所有的日志请求）和OFF（拒绝所有的日志请求）这两种特殊的级别。</p>
<p>&nbsp;</p>
<p>二）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Appenders</p>
<p>&nbsp;</p>
<p>Appenders决定日志输出的方式。</p>
<p>Appenders必须实现log4net.Appenders.IAppender接口。</p>
<p>&nbsp;</p>
<p>Log4net目前支持的输出方式包括：<br>
1&nbsp;AdoNetAppender<br>
&nbsp;&nbsp;&nbsp;&nbsp;将日志记录到数据库中。可以采用SQL和存储过程两种方式。</p>
<p>2&nbsp;AnsiColorTerminalAppender<br>
&nbsp;&nbsp;&nbsp;&nbsp;在ANSI&nbsp;窗口终端写下高亮度的日志事件。</p>
<p>3&nbsp;AspNetTraceAppender<br>
&nbsp;&nbsp;&nbsp;&nbsp;能用asp.net中Trace的方式查看记录的日志。</p>
<p>4&nbsp;BufferingForwardingAppender<br>
&nbsp;&nbsp;&nbsp;&nbsp;在输出到子Appenders之前先缓存日志事件。</p>
<p>5&nbsp;ConsoleAppender<br>
&nbsp;&nbsp;&nbsp;&nbsp;将日志输出到控制台。</p>
<p>6&nbsp;EventLogAppender<br>
&nbsp;&nbsp;&nbsp;&nbsp;将日志写到Windows&nbsp;Event&nbsp;Log.&nbsp;</p>
<p>7&nbsp;FileAppender<br>
&nbsp;&nbsp;&nbsp;&nbsp;将日志写到文件中。</p>
<p>8&nbsp;LocalSyslogAppender<br>
&nbsp;&nbsp;&nbsp;&nbsp;将日志写到local&nbsp;syslog&nbsp;service&nbsp;(仅用于UNIX环境下).&nbsp;<br>
9&nbsp;MemoryAppender<br>
&nbsp;&nbsp;&nbsp;&nbsp;将日志存到内存缓冲区。</p>
<p>10&nbsp;NetSendAppender<br>
&nbsp;&nbsp;&nbsp;&nbsp;将日志输出到Windows&nbsp;Messenger&nbsp;service.这些日志信息将在用户终端的对话框中显示。</p>
<p>11&nbsp;RemoteSyslogAppender<br>
&nbsp;&nbsp;&nbsp;&nbsp;通过UDP网络协议将日志写到Remote&nbsp;syslog&nbsp;service。</p>
<p>12&nbsp;RemotingAppender<br>
&nbsp;&nbsp;&nbsp;&nbsp;通过.NET&nbsp;Remoting将日志写到远程接收端。</p>
<p>13&nbsp;RollingFileAppender<br>
&nbsp;&nbsp;&nbsp;&nbsp;将日志以回滚文件的形式写到文件中。</p>
<p>14&nbsp;SmtpAppender<br>
&nbsp;&nbsp;&nbsp;&nbsp;将日志写到邮件中。</p>
<p>15&nbsp;TraceAppender<br>
&nbsp;&nbsp;&nbsp;&nbsp;将日志写到.NET&nbsp;trace&nbsp;系统。</p>
<p>16&nbsp;UdpAppender<br>
&nbsp;&nbsp;&nbsp;&nbsp;将日志connectionless&nbsp;UDP&nbsp;datagrams的形式送到远程宿主或以UdpClient的形式广播。&nbsp;</p>
<p>&nbsp;</p>
<p>三）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Filters</p>
<p>&nbsp;</p>
<p>Appender对象将日志以缺省的方式传到输出流，然后Filter可以按照不同的标准控制日志的输出。Filter可以再配置文件中配置。最简单的形式是在appender中写明一个Threshold.这样只有级别大于或等于此Threshold的日志才被记录。</p>
<p>Filters必须实现log4net.Filters.IFilter接口。</p>
<p>&nbsp;</p>
<p>四）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Layouts</p>
<p>&nbsp;</p>
<p>Layouts控制日志显示的格式样式。日志的显示格式如下：</p>
<p>"%timestamp&nbsp;[%thread]&nbsp;%-5level&nbsp;%logger&nbsp;-&nbsp;%message%newline"</p>
<p>Timestamp:&nbsp;表示程序已经开始执行的时间。&nbsp;单位[毫秒]。</p>
<p>Thread:执行当前代码的线程。</p>
<p>Level：日志的级别。</p>
<p>Logger：日志相关请求的名称。</p>
<p>Message:　日志消息。</p>
<p>&nbsp;</p>
<p>Layouts还可以控制日志的输出样式，比如以普通形式或以xml等形式输出。</p>
<p>&nbsp;</p>
<p>五）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Object&nbsp;Renderers</p>
<p>&nbsp;</p>
<p>这是很重要的一项，log4net将按照用户定义的标准输出日志消息。</p>
<p>Object&nbsp;Renders必须实现log4net.ObjectRenderer.IObjectRenerer接口。</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>三&nbsp;如何在项目中使用log4net</p>
<p>&nbsp;</p>
<p>下面有个基于控制台的demo，举例描述了log4net怎么用于输出日志。<br>
本例中，日志将会记录到文件，控制台，事件日至和Access数据库中。</p>
<p>&nbsp;</p>
<p>一）主要代码:</p>
<p>1.&nbsp;配置文件app.config</p>
<p>&nbsp;</p>
<div class="cnblogs_code"><img style="display: none;" id="Code_Closed_Image_160354" onclick="this.style.display='none'; document.getElementById('Code_Closed_Text_160354').style.display='none'; document.getElementById('Code_Open_Image_160354').style.display='inline'; document.getElementById('Code_Open_Text_160354').style.display='inline';" src="contractedblock.gif" align="top" height="16" width="11"><img id="Code_Open_Image_160354" style="display: inline;" onclick="this.style.display='none'; document.getElementById('Code_Open_Text_160354').style.display='none'; getElementById('Code_Closed_Image_160354').style.display='inline'; getElementById('Code_Closed_Text_160354').style.display='inline';" src="expandedblockstart.gif" align="top" height="16" width="11"><span style="display: none;" class="cnblogs_code_Collapse" id="Code_Closed_Text_160354">Code</span><span id="Code_Open_Text_160354" style="display: inline;"><br>
<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><img src="none.gif" alt="" align="top"><span style="color: rgb(0, 0, 0);">&lt;?</span><span style="color: rgb(0, 0, 0);">xml&nbsp;version</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">1.0</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;encoding</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">utf-8</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">?&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">configuration</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;!--</span><span style="color: rgb(0, 0, 0);">&nbsp;Register&nbsp;a&nbsp;section&nbsp;handler&nbsp;</span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">&nbsp;the&nbsp;log4net&nbsp;section&nbsp;</span><span style="color: rgb(0, 0, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">configSections</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">section&nbsp;name</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">log4net</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;type</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">System.Configuration.IgnoreSectionHandler</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">appSettings</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;!--</span><span style="color: rgb(0, 0, 0);">&nbsp;To&nbsp;enable&nbsp;</span><span style="color: rgb(0, 0, 255);">internal</span><span style="color: rgb(0, 0, 0);">&nbsp;log4net&nbsp;logging&nbsp;specify&nbsp;the&nbsp;following&nbsp;appSettings&nbsp;key&nbsp;</span><span style="color: rgb(0, 0, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;!--</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">add&nbsp;key</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">log4net.Internal.Debug</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">true</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">--&gt;&lt;/</span><span style="color: rgb(0, 0, 0);">appSettings</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;!--</span><span style="color: rgb(0, 0, 0);">&nbsp;This&nbsp;section&nbsp;contains&nbsp;the&nbsp;log4net&nbsp;configuration&nbsp;settings&nbsp;</span><span style="color: rgb(0, 0, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">log4net</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;!--</span><span style="color: rgb(0, 0, 0);">定义输出到文件中</span><span style="color: rgb(0, 0, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">appender&nbsp;name</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">LogFileAppender</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;type</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">log4net.Appender.FileAppender</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;!--</span><span style="color: rgb(0, 0, 0);">定义文件存放位置</span><span style="color: rgb(0, 0, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">file&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">D:\log-file1.txt</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;!--</span><span style="color: rgb(0, 0, 0);">&nbsp;Example&nbsp;</span><span style="color: rgb(0, 0, 255);">using</span><span style="color: rgb(0, 0, 0);">&nbsp;environment&nbsp;variables&nbsp;</span><span style="color: rgb(0, 0, 255);">in</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">params</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;!--</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">file&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">${TMP}\log-file.txt</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;!--&lt;</span><span style="color: rgb(0, 0, 0);">sppendToFile&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">true</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;!--</span><span style="color: rgb(0, 0, 0);">&nbsp;An&nbsp;alternate&nbsp;output&nbsp;encoding&nbsp;can&nbsp;be&nbsp;specified&nbsp;</span><span style="color: rgb(0, 0, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;!--</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">encoding&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">unicodeFFFE</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">layout&nbsp;type</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">log4net.Layout.PatternLayout</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;!--</span><span style="color: rgb(0, 0, 0);">每条日志末尾的文字说明</span><span style="color: rgb(0, 0, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">footer&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">[Footer]--Test&nbsp;By&nbsp;Ring1981&nbsp;&nbsp;</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;!--</span><span style="color: rgb(0, 0, 0);">输出格式</span><span style="color: rgb(0, 0, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">conversionPattern&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">%date&nbsp;[%thread]&nbsp;%-5level&nbsp;%logger&nbsp;[%ndc]&nbsp;&amp;lt;%property{auth}&amp;gt;&nbsp;-&nbsp;%message%newline</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;/</span><span style="color: rgb(0, 0, 0);">layout</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;/</span><span style="color: rgb(0, 0, 0);">appender</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;!--</span><span style="color: rgb(0, 0, 0);">定义输出到控制台命令行中</span><span style="color: rgb(0, 0, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">appender&nbsp;name</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">ConsoleAppender</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;type</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">log4net.Appender.ConsoleAppender</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">layout&nbsp;type</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">log4net.Layout.PatternLayout</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">conversionPattern&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">%date&nbsp;[%thread]&nbsp;%-5level&nbsp;%logger&nbsp;[%property{NDC}]&nbsp;-&nbsp;%message%newline</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;/</span><span style="color: rgb(0, 0, 0);">layout</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;/</span><span style="color: rgb(0, 0, 0);">appender</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;!--</span><span style="color: rgb(0, 0, 0);">定义输出到windows事件中</span><span style="color: rgb(0, 0, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">appender&nbsp;name</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">EventLogAppender</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;type</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">log4net.Appender.EventLogAppender</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">layout&nbsp;type</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">log4net.Layout.PatternLayout</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">conversionPattern&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">%date&nbsp;[%thread]&nbsp;%-5level&nbsp;%logger&nbsp;[%property{NDC}]&nbsp;-&nbsp;%message%newline</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;/</span><span style="color: rgb(0, 0, 0);">layout</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;/</span><span style="color: rgb(0, 0, 0);">appender</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;!--</span><span style="color: rgb(0, 0, 0);">定义输出到数据库中，这里举例输出到Access数据库中，数据库为D盘的access.mdb</span><span style="color: rgb(0, 0, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">appender&nbsp;name</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">AdoNetAppender_Access</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;type</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">log4net.Appender.AdoNetAppender</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">connectionString&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">Provider=Microsoft.Jet.OLEDB.4.0;Data&nbsp;Source=D:\access.mdb</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">commandText&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">INSERT&nbsp;INTO&nbsp;Log&nbsp;([Date],[Thread],[Level],[Logger],[Message])&nbsp;VALUES&nbsp;(@log_date,&nbsp;@thread,&nbsp;@log_level,&nbsp;@logger,&nbsp;@message)</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;!--</span><span style="color: rgb(0, 0, 0);">定义各个参数</span><span style="color: rgb(0, 0, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">parameter</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">parameterName&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">@log_date</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">dbType&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">String</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">size&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">255</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">layout&nbsp;type</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">log4net.Layout.PatternLayout</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">conversionPattern&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">%date</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;/</span><span style="color: rgb(0, 0, 0);">layout</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;/</span><span style="color: rgb(0, 0, 0);">parameter</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">parameter</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">parameterName&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">@thread</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">dbType&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">String</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">size&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">255</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">layout&nbsp;type</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">log4net.Layout.PatternLayout</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">conversionPattern&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">%thread</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;/</span><span style="color: rgb(0, 0, 0);">layout</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;/</span><span style="color: rgb(0, 0, 0);">parameter</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">parameter</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">parameterName&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">@log_level</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">dbType&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">String</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">size&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">50</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">layout&nbsp;type</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">log4net.Layout.PatternLayout</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">conversionPattern&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">%level</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;/</span><span style="color: rgb(0, 0, 0);">layout</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;/</span><span style="color: rgb(0, 0, 0);">parameter</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">parameter</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">parameterName&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">@logger</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">dbType&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">String</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">size&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">255</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">layout&nbsp;type</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">log4net.Layout.PatternLayout</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">conversionPattern&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">%logger</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;/</span><span style="color: rgb(0, 0, 0);">layout</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;/</span><span style="color: rgb(0, 0, 0);">parameter</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">parameter</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">parameterName&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">@message</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">dbType&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">String</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">size&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">1024</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">layout&nbsp;type</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">log4net.Layout.PatternLayout</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">conversionPattern&nbsp;value</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">%message</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;/</span><span style="color: rgb(0, 0, 0);">layout</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;/</span><span style="color: rgb(0, 0, 0);">parameter</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;/</span><span style="color: rgb(0, 0, 0);">appender</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;!--</span><span style="color: rgb(0, 0, 0);">定义日志的输出媒介，下面定义日志以四种方式输出。也可以下面的按照一种类型或其他类型输出。</span><span style="color: rgb(0, 0, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">root</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">appender</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 255);">ref</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">ref</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">LogFileAppender</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">appender</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 255);">ref</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">ref</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">ConsoleAppender</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">appender</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 255);">ref</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">ref</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">EventLogAppender</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">appender</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 255);">ref</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">ref</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">AdoNetAppender_Access</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;/</span><span style="color: rgb(0, 0, 0);">root</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 0);">&lt;/</span><span style="color: rgb(0, 0, 0);">log4net</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top"></span><span style="color: rgb(0, 0, 0);">&lt;/</span><span style="color: rgb(0, 0, 0);">configuration</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img src="none.gif" alt="" align="top"><br>
<img src="none.gif" alt="" align="top"></span></span></div>
<p>2.&nbsp;LoggingExample.cs</p>
<p>&nbsp;</p>
<div class="cnblogs_code"><img style="display: none;" id="Code_Closed_Image_161236" onclick="this.style.display='none'; document.getElementById('Code_Closed_Text_161236').style.display='none'; document.getElementById('Code_Open_Image_161236').style.display='inline'; document.getElementById('Code_Open_Text_161236').style.display='inline';" src="contractedblock.gif" align="top" height="16" width="11"><img id="Code_Open_Image_161236" style="display: inline;" onclick="this.style.display='none'; document.getElementById('Code_Open_Text_161236').style.display='none'; getElementById('Code_Closed_Image_161236').style.display='inline'; getElementById('Code_Closed_Text_161236').style.display='inline';" src="expandedblockstart.gif" align="top" height="16" width="11"><span style="display: none;" class="cnblogs_code_Collapse" id="Code_Closed_Text_161236">Code</span><span id="Code_Open_Text_161236" style="display: inline;"><br>
<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">&nbsp;Configure&nbsp;log4net&nbsp;using&nbsp;the&nbsp;.config&nbsp;file</span><span style="color: rgb(0, 128, 0);"><br>
</span><span style="color: rgb(0, 0, 0);">&nbsp;[assembly:&nbsp;log4net.Config.XmlConfigurator(Watch</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 255);">true</span><span style="color: rgb(0, 0, 0);">)]<br>
&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">&nbsp;This&nbsp;will&nbsp;cause&nbsp;log4net&nbsp;to&nbsp;look&nbsp;for&nbsp;a&nbsp;configuration&nbsp;file<br>
&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">&nbsp;called&nbsp;ConsoleApp.exe.config&nbsp;in&nbsp;the&nbsp;application&nbsp;base<br>
&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">&nbsp;directory&nbsp;(i.e.&nbsp;the&nbsp;directory&nbsp;containing&nbsp;ConsoleApp.exe)</span><span style="color: rgb(0, 128, 0);"><br>
</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;</span><span style="color: rgb(0, 0, 255);">namespace</span><span style="color: rgb(0, 0, 0);">&nbsp;ConsoleApp<br>
&nbsp;{<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">using</span><span style="color: rgb(0, 0, 0);">&nbsp;System;<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">/**/</span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;</span><span style="color: rgb(128, 128, 128);">&lt;summary&gt;</span><span style="color: rgb(0, 128, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;Example&nbsp;of&nbsp;how&nbsp;to&nbsp;simply&nbsp;configure&nbsp;and&nbsp;use&nbsp;log4net<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;</span><span style="color: rgb(128, 128, 128);">&lt;/summary&gt;</span><span style="color: rgb(128, 128, 128);"><br>
</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">&nbsp;LoggingExample<br>
&nbsp;&nbsp;&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">readonly</span><span style="color: rgb(0, 0, 0);">&nbsp;log4net.ILog&nbsp;log&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">&nbsp;Main(</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">[]&nbsp;args)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;log.Error(</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">Error&nbsp;Acc</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;log.Fatal(</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">Fatle&nbsp;Acc</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Console.ReadLine();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;}<br>
}<br>
</span></span></div>
<p>&nbsp;</p>
<p><font style="background-color: rgb(199, 237, 204);" face="Verdana">运行程序，日志就会以xml中定义的四种媒介形式输出。 <br><span>
源代码可以从<a href="http://files.cnblogs.com/Ring1981/Log4net%20Test.rar%E4%B8%8B%E8%BD%BD%E3%80%82" class="smarterwiki-linkify">http://files.cnblogs.com/Ring1981/Log4net%20Test.rar下载。</a></span></font></p>
<div id="EntryTag">Tag标签: <a href="http://www.cnblogs.com/shyblog/tag/.NET/">.NET</a></div>
<div id="digg_block">
<div id="div_digg">										
	<div class="diggit" onclick="DiggIt(1336052,47779,1)"> 
		<span class="diggnum" id="digg_count_1336052">0</span>
	</div>
	<div class="buryit" onclick="DiggIt(1336052,47779,2)"> 
		<span class="burynum" id="bury_count_1336052">0</span>
	</div>
	<div class="clear"></div>
	<span style="display: none;" id="span_isdigged_1336052">0</span>	
	<div class="diggword" id="digg_word_1336052">(请您对文章做出评价)</div>	
</div>
</div>
<div class="clear"></div>
<div id="post_next_prev">
<a href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1335975.html">« </a> 上一篇：<a href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1335975.html" title="发布于2008-11-18 15:09">GridView中超链接的使用</a><br>
<a href="http://www.cnblogs.com/shyblog/archive/2008/11/19/1336580.html">» </a> 下一篇：<a href="http://www.cnblogs.com/shyblog/archive/2008/11/19/1336580.html" title="发布于2008-11-19 13:22">AjaxPro实现无刷新模仿MSN提示消息功能</a><br>
</div>







</div>
	</div><a name="pagedcomment"></a>
<h3>Feedback</h3>
	
			<div class="post">
				<div class="posthead">
					<h2>
						<a href="#1373642">#1楼</a><a name="1373642" id="comment_anchor_1373642"></a>
						&nbsp;&nbsp;<a onclick='ReplyComment("Astar",1373642,"5EFTe185HH2GOBbGL/0O/VjlaBOd8kgrogjJMbqAb9oJBLUnUyjXKw==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(1373642,"5EFTe185HH2GOBbGL/0O/VjlaBOd8kgrogjJMbqAb9oJBLUnUyjXKw==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Astar" target="_top">查看</a>&nbsp;&nbsp;&nbsp;&nbsp;
					</h2>
					2008-11-18 16:24 by <a id="Comments1_CommentList_ctl00_NameLink" href="http://www.cnblogs.com/xlovey/" target="_top">Astar</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/Astar" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
				</div>
				<div class="postbody"><span id="comment_body_1373642" class="blog_comment_body">真巧，我也是今天剛用的.不過有一遍使用手冊介紹的很詳細～</span></div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a href="#1373674">#2楼</a><a name="1373674" id="comment_anchor_1373674"></a>
						&nbsp;&nbsp;<a onclick='ReplyComment("玉开",1373674,"OtU5KxlYv4z5OZGGpojSxy6cko9zOKHdMM4bZR6QsHir3A40TXKoAA==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(1373674,"OtU5KxlYv4z5OZGGpojSxy6cko9zOKHdMM4bZR6QsHir3A40TXKoAA==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=%e7%8e%89%e5%bc%80" target="_top">查看</a>&nbsp;&nbsp;&nbsp;&nbsp;
					</h2>
					2008-11-18 16:53 by <a id="Comments1_CommentList_ctl01_NameLink" href="http://www.cnblogs.com/yukaizhao/" target="_top">玉开</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/%e7%8e%89%e5%bc%80" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
				</div>
				<div class="postbody"><span id="comment_body_1373674" class="blog_comment_body">这个生成日期型的文件名，每天会出现一次重复日期的名，例如：2008100112.txt2008100112.txt，你有没有办法解决？</span></div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a href="#1373709">#3楼</a><a name="1373709" id="comment_anchor_1373709"></a>
						&nbsp;&nbsp;<a onclick='ReplyComment("老农",1373709,"NEaUUANychZfTsT/RSYJIyPziYSWh8Dx6SS12AT5jyXWo+XnpBC4cA==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(1373709,"NEaUUANychZfTsT/RSYJIyPziYSWh8Dx6SS12AT5jyXWo+XnpBC4cA==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=%e8%80%81%e5%86%9c" target="_top">查看</a>&nbsp;&nbsp;&nbsp;&nbsp;
					</h2>
					2008-11-18 17:26 by <a id="Comments1_CommentList_ctl02_NameLink" href="http://www.cnblogs.com/wei/" target="_top">老农</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/%e8%80%81%e5%86%9c" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
				</div>
				<div class="postbody"><span id="comment_body_1373709" class="blog_comment_body">为什么都说LOG4NET好呢,看那么一长串配置就烦.</span></div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a href="#1373716">#4楼</a><a name="1373716" id="comment_anchor_1373716"></a>
						&nbsp;&nbsp;<a onclick='ReplyComment("GUO Xingwang",1373716,"ER9aaqYAQn1Hi34ydc/I61irO3U6GpicHTH3M0Q+RqkR9ITkKQxaJQ==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(1373716,"ER9aaqYAQn1Hi34ydc/I61irO3U6GpicHTH3M0Q+RqkR9ITkKQxaJQ==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=GUO+Xingwang" target="_top">查看</a>&nbsp;&nbsp;&nbsp;&nbsp;
					</h2>
					2008-11-18 17:33 by <a id="Comments1_CommentList_ctl03_NameLink" href="http://www.cnblogs.com/Thriving-Country/" target="_top">GUO Xingwang</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/GUO+Xingwang" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
				</div>
				<div class="postbody"><span id="comment_body_1373716" class="blog_comment_body">@老农
<br>同感！</span></div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a href="#1373741">#5楼</a><a name="1373741" id="comment_anchor_1373741"></a>
						&nbsp;&nbsp;<a onclick='ReplyComment("非主流程序员",1373741,"yT89CSMlLZzgtOXFz+g5vuf8SuTniwq8SYZYmw9wO2O4VjuNNWVRUQ==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(1373741,"yT89CSMlLZzgtOXFz+g5vuf8SuTniwq8SYZYmw9wO2O4VjuNNWVRUQ==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=%e9%9d%9e%e4%b8%bb%e6%b5%81%e7%a8%8b%e5%ba%8f%e5%91%98" target="_top">查看</a>&nbsp;&nbsp;&nbsp;&nbsp;
					</h2>
					2008-11-18 18:03 by <a id="Comments1_CommentList_ctl04_NameLink" href="http://www.cnblogs.com/prime/" target="_top">非主流程序员</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/%e9%9d%9e%e4%b8%bb%e6%b5%81%e7%a8%8b%e5%ba%8f%e5%91%98" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
				</div>
				<div class="postbody"><span id="comment_body_1373741" class="blog_comment_body">@老农<br>如果你做Java，你会发现程序是配出来的。N多xml。<br>现在.NET也向Java学习了，所有的开源组件都有大量的配置文件，甚至微软自己也是一大堆，比如App.config, EntityFramework。只是MS用VS让配置文件可视化了。</span></div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a href="#1373746">#6楼</a><a name="1373746" id="comment_anchor_1373746"></a>
						&nbsp;&nbsp;<a onclick='ReplyComment("暗点",1373746,"x8YfuiU9qPx0TcLBHkUYG0msvQ0FTrNX0LDFHQR4vc445ZTgDiS78g==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(1373746,"x8YfuiU9qPx0TcLBHkUYG0msvQ0FTrNX0LDFHQR4vc445ZTgDiS78g==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=%e6%9a%97%e7%82%b9" target="_top">查看</a>&nbsp;&nbsp;&nbsp;&nbsp;
					</h2>
					2008-11-18 18:11 by <a id="Comments1_CommentList_ctl05_NameLink" href="http://www.cnblogs.com/scotoma/" target="_top">暗点</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/%e6%9a%97%e7%82%b9" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
				</div>
				<div class="postbody"><span id="comment_body_1373746" class="blog_comment_body"><a href="http://files.cnblogs.com/agtaimaer/Log4netDemo.rar" target="_new">http://files.cnblogs.com/agtaimaer/Log4netDemo.rar</a>
<br>
<br>恰好今天这位兄弟也发了个，他的DEMO比较全面一点非常不错。楼主可以参考下</span></div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a href="#1373763">#7楼</a><a name="1373763" id="comment_anchor_1373763"></a>
						&nbsp;&nbsp;<a onclick='ReplyComment("火星人.NET",1373763,"unvUA7MHgG8CeROsfDWxaFeUba/uX3clFdPgF2jBojJxdUAPqnzPTA==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(1373763,"unvUA7MHgG8CeROsfDWxaFeUba/uX3clFdPgF2jBojJxdUAPqnzPTA==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=%e7%81%ab%e6%98%9f%e4%ba%ba.NET" target="_top">查看</a>&nbsp;&nbsp;&nbsp;&nbsp;
					</h2>
					2008-11-18 18:46 by <a id="Comments1_CommentList_ctl06_NameLink" href="http://www.cnblogs.com/huoxingren/" target="_top">火星人.NET</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/%e7%81%ab%e6%98%9f%e4%ba%ba.NET" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
				</div>
				<div class="postbody"><span id="comment_body_1373763" class="blog_comment_body">配置文件最大的好处就是灵活~~~</span></div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a href="#1373846">#8楼</a><a name="1373846" id="comment_anchor_1373846"></a> 58.38.92.* 
						&nbsp;&nbsp;<a onclick='ReplyComment("FGL",1373846,"")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(1373846,"")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">引用</a>&nbsp;&nbsp;&nbsp;&nbsp;
					</h2>
					2008-11-18 21:35 by <a id="Comments1_CommentList_ctl07_NameLink" target="_blank">FGL[未注册用户]</a>
				</div>
				<div class="postbody"><span id="comment_body_1373846" class="blog_comment_body">灵活个屁</span></div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a href="#1373848">#9楼</a><a name="1373848" id="comment_anchor_1373848"></a> 58.38.92.* 
						&nbsp;&nbsp;<a onclick='ReplyComment("FGL",1373848,"")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(1373848,"")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">引用</a>&nbsp;&nbsp;&nbsp;&nbsp;
					</h2>
					2008-11-18 21:37 by <a id="Comments1_CommentList_ctl08_NameLink" target="_blank">FGL[未注册用户]</a>
				</div>
				<div class="postbody"><span id="comment_body_1373848" class="blog_comment_body">用这些东西就是让你知道Java可以的，.NET同样且做得更好。</span></div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a href="#1374177">#10楼</a><a name="1374177" id="comment_anchor_1374177"></a>[<span class="louzhu">楼主</span>]
						&nbsp;&nbsp;<a onclick='ReplyComment("suhanyu",1374177,"zahAhNzRqfLjXoqMMMj42sMZ/9+uO/tqb9IUqF/gMOi+PrItFC/BDA==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(1374177,"zahAhNzRqfLjXoqMMMj42sMZ/9+uO/tqb9IUqF/gMOi+PrItFC/BDA==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=suhanyu" target="_top">查看</a>&nbsp;&nbsp;&nbsp;&nbsp;
					</h2>
					2008-11-19 10:39 by <a id="Comments1_CommentList_ctl09_NameLink" href="http://www.cnblogs.com/shyblog/" target="_top">suhanyu</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/suhanyu" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
				</div>
				<div class="postbody"><span id="comment_body_1374177" class="blog_comment_body">@老农
<br>我也是刚刚接触，你有更好的记录日志的办法吗？不妨分享下
<br></span></div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a href="#1374896">#11楼</a><a name="1374896" id="comment_anchor_1374896"></a>
						&nbsp;&nbsp;<a onclick='ReplyComment("BoyLee",1374896,"1uSqu0F0V2BDmOVrT/VTfxtYuIy/GTTrEzl9q3XNhYlAvNTBuImwsw==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(1374896,"1uSqu0F0V2BDmOVrT/VTfxtYuIy/GTTrEzl9q3XNhYlAvNTBuImwsw==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=BoyLee" target="_top">查看</a>&nbsp;&nbsp;&nbsp;&nbsp;
					</h2>
					2008-11-19 21:41 by <a id="Comments1_CommentList_ctl10_NameLink" href="http://www.cnblogs.com/boylee/" target="_top">BoyLee</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/BoyLee" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
				</div>
				<div class="postbody"><span id="comment_body_1374896" class="blog_comment_body">还是自己写个简单的好</span></div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a href="#1375992">#12楼</a><a name="1375992" id="comment_anchor_1375992"></a>
						&nbsp;&nbsp;<a onclick='ReplyComment("鹏鹏_Lovely",1375992,"5OZaTygj4gf2zMN9JwoKftDOxFC3lxPtNH/PweBG3FgUNYUH66LDww==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(1375992,"5OZaTygj4gf2zMN9JwoKftDOxFC3lxPtNH/PweBG3FgUNYUH66LDww==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=%e9%b9%8f%e9%b9%8f_Lovely" target="_top">查看</a>&nbsp;&nbsp;&nbsp;&nbsp;
					</h2>
					2008-11-20 16:25 by <a id="Comments1_CommentList_ctl11_NameLink" href="http://www.cnblogs.com/dupeng0811/" target="_top">鹏鹏_Lovely</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/%e9%b9%8f%e9%b9%8f_Lovely" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
				</div>
				<div class="postbody"><span id="comment_body_1375992" class="blog_comment_body">我觉得挺好的，现在正在学习中……</span></div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a href="#1380242">#13楼</a><a name="1380242" id="comment_anchor_1380242"></a>
						&nbsp;&nbsp;<a onclick='ReplyComment("XMLSpy",1380242,"PJ+JzWbdcX2ehSdGf6e/H7gjJPre9LwqzN0qUlBJTq9rcF9rcrygfw==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(1380242,"PJ+JzWbdcX2ehSdGf6e/H7gjJPre9LwqzN0qUlBJTq9rcF9rcrygfw==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=XMLSpy" target="_top">查看</a>&nbsp;&nbsp;&nbsp;&nbsp;
					</h2>
					2008-11-24 16:21 by <a id="Comments1_CommentList_ctl12_NameLink" href="http://www.cnblogs.com/xmlspy/" target="_top">XMLSpy</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/XMLSpy" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
				</div>
				<div class="postbody"><span id="comment_body_1380242" class="blog_comment_body">如何动态更改日志文件输出路径.
<br>通常应用程序都会有个日志输出路径供用户配置.
<br>这个在log4net如何实现?</span></div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a href="#1384144">#14楼</a><a name="1384144" id="comment_anchor_1384144"></a><a name="Post"></a>
						&nbsp;&nbsp;<a onclick='ReplyComment("Cheese",1384144,"3ao/cehq4xeb23VhhfTTBxACikNYB1PGWUJjGDRiLBuaWUEWMncgUw==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(1384144,"3ao/cehq4xeb23VhhfTTBxACikNYB1PGWUJjGDRiLBuaWUEWMncgUw==")' href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Cheese" target="_top">查看</a>&nbsp;&nbsp;&nbsp;&nbsp;
					</h2>
					2008-11-27 17:09 by <a id="Comments1_CommentList_ctl13_NameLink" href="http://www.cnblogs.com/Cheese_Ren/" target="_top">Cheese</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/Cheese" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
				</div>
				<div class="postbody"><span id="comment_body_1384144" class="blog_comment_body">博主的下载链接是错的哈，应该是<a href="http://logging.apache.org/log4net/download.html" target="_new">http://logging.apache.org/log4net/download.html</a>
<br>log4net好像很久没发布新版本了，目前最新的版本是1.2.10 ，
<br>看源代码好像是基于.net framework 1.1 写的，用vs2005打开解决方案的时候，还提示是低版本的工程，转了一下。
<br>
<br>另外压缩包解出来，里面乱七八糟的好多东东，
<br>不过我用的是src文件夹里面的源代码编译出来的dll
<br>
<br>
<br>
<br></span></div>
			</div>
		

<div id="comment_form" class="commentform">



<div id="divCommentShow"></div>
<div id="comment_nav" style="text-align: right;"><span id="span_refresh_tips"></span><a href="###" onclick="return RefreshCommentList(1336052);" name="commentform" id="lnk_RefreshComments">刷新评论列表</a>&nbsp; <a href="###" onclick="return RefreshPage();">刷新页面</a>&nbsp; <a href="#top">返回页首</a></div>
<div id="commentform_title">发表评论 <span class="ad_commentbox_up"><a href="http://www.cnblogs.com/" target="_top">博客园首页</a>&nbsp; <a href="http://news.cnblogs.com/" target="_top">IT新闻</a>&nbsp; <a href="http://home.cnblogs.com/ing/" target="_top">闪存</a>&nbsp; <a href="http://job.cnblogs.com/" target="_top">招聘</a>&nbsp; <a href="http://a4.yeshj.com/rd/34143/" target="_top">学英语</a></span></div>
<span id="tip_comment" style="color: Red;"></span>
<p>
昵称：<input name="ctl04$tbCommentAuthor" id="ctl04_tbCommentAuthor" class="author" value="解然" disabled="disabled" type="text">
</p>
<p>
主页：<input name="ctl04$tbCommentAuthorUrl" id="ctl04_tbCommentAuthorUrl" class="url" value="http://www.cnblogs.com/xieran/" disabled="disabled" type="text">
</p>
<p>
</p><div class="commentbox_title">
<div class="commentbox_title_left">评论内容：</div>
<div class="commentbox_title_right">
<img id="ubb_quote" class="comment_icon" src="quote.gif" alt="引用" title="添加引用" onclick="insertUBB('tbCommentBody','quote')">
<img id="ubb_bold" class="comment_icon" src="b.png" alt="粗体" title="添加粗体" onclick="insertUBB('tbCommentBody','b')">
<img id="ubb_url" class="comment_icon" src="lk.png" alt="链接" title="添加链接" onclick="insertUbbUrl('tbCommentBody')">
<img id="ubb_indent" class="comment_icon" src="indent.png" alt="缩进" title="添加首行缩进" onclick="insertIndent('tbCommentBody')">
<img id="ubb_img" class="comment_icon" src="img.gif" alt="图片" title="添加图片" onclick="insertUbbImg('tbCommentBody')">
<img id="ubb_code" class="comment_icon" style="" src="insertcode.gif" alt="代码" title="添加代码" onclick="insertUbbCode()">
</div>
</div>
<div class="clear"></div>
<textarea id="tbCommentBody" class="comment_textarea" onkeydown="return clt_enter(event)"></textarea>
<p></p>
<p>
<input id="btn_comment_submit" class="comment_btn" value="提交" onclick="PostComment();return false;" type="button">
&nbsp;&nbsp;<span id="span_comment_canceledit" style="display: none;"><a href="###" onclick="return CancelCommentEdit()">不改了</a>&nbsp;&nbsp;</span><a href="http://passport.cnblogs.com/logout.aspx?ReturnUrl=http%3a%2f%2fwww.cnblogs.com%2fshyblog%2farchive%2f2008%2f11%2f18%2f1336052.html%3flogout%3d1%23commentform" onclick="return confirm('确认注销吗？')">注销</a>&nbsp;&nbsp;<a id="ctl04_lnkSubscribe" title="邮件订阅回复通知" onclick="return SubscribeComment();" href="http://www.cnblogs.com/UI/Controls/#%23%23">订阅回复</a>
</p>
<p>
[使用Ctrl+Enter键快速提交]
</p>
<div style="display: none;">
<span id="comment_edit_id"></span><span id="span_parentcomment_id">0</span>
<span id="span_parent_id">1336052</span>
<span id="span_comment_replyto"></span>
<span id="span_comment_title">Log4net日志记录组件-学习心得</span>
<span id="span_comment_posted"></span>
</div>

<div class="itnews c_ad_block" id="itnews">
<a href="http://news.cnblogs.com/" target="_top">IT新闻</a>:<br>

          ·  <a href="http://news.cnblogs.com/n/55140/" target="_top">《星际争霸2》"刀锋女王"重金属主题音乐视频</a><br>
	
          ·  <a href="http://news.cnblogs.com/n/55139/" target="_top">中国站长最郁闷的几件事情</a><br>
	
          ·  <a href="http://news.cnblogs.com/n/55138/" target="_top">苹果Vs谷歌：手机领域谁怕谁？</a><br>
	
          ·  <a href="http://news.cnblogs.com/n/55137/" target="_top">摩托罗拉：豪赌Android的希望与隐忧</a><br>
	
          ·  <a href="http://news.cnblogs.com/n/55136/" target="_top">分众新坐标：楼宇是过去 未来在手机和互联网</a><br>
	
</div>


<div id="ad_under_comment" class="c_ad_block">
<a href="http://a4.yeshj.com/rd/34138/" target="_top">每天10分钟，轻松学英语</a><br><br>
<div id="google_ads_div_cnblogs_blogpost_bottom1">
<iframe src="index_2.html" style="border: 0pt none ;" marginheight="0" marginwidth="0" name="google_ads_iframe_cnblogs_blogpost_bottom1" id="google_ads_iframe_cnblogs_blogpost_bottom1" scrolling="no" frameborder="0" height="60" width="468"></iframe></div>

<br>
<div id="google_ads_div_cnblogs_blogpost_bottom">
<iframe src="index_3.html" style="border: 0pt none ;" marginheight="0" marginwidth="0" name="google_ads_iframe_cnblogs_blogpost_bottom" id="google_ads_iframe_cnblogs_blogpost_bottom" scrolling="no" frameborder="0" height="250" width="300"></iframe></div>

</div>
<div id="site_nav_under" class="c_ad_block">
网站导航：<br>
<a href="http://www.cnblogs.com/" target="_top">博客园首页</a> &nbsp;<a href="http://news.cnblogs.com/" target="_top">IT新闻</a> &nbsp;<a href="http://home.cnblogs.com/" target="_top">个人主页</a> &nbsp;<a href="http://home.cnblogs.com/ing/" target="_top">闪存</a> &nbsp;<a href="http://job.cnblogs.com/" target="_top">程序员招聘</a> &nbsp;<a href="http://space.cnblogs.com/" target="_top">社区</a> &nbsp;<a href="http://space.cnblogs.com/q/" target="_top">博问</a> &nbsp;<a href="http://wz.cnblogs.com/" target="_top">网摘</a>
</div>
<div id="ad_under_comment2" class="c_ad_block">
<a href="http://www.china-pub.com/STATIC07/0912/zh_ndcx_091212.asp" target="_top"><img src="chinapub_20091222.jpg" alt="" style="border: 0px none ;"></a><br>
<a href="http://www.china-pub.com/itbook/" target="_top">China-pub 计算机图书网上专卖店！6.5万品种2-8折！</a><br>
<a href="http://www.china-pub.com/static07/0901/zh_jueba_090121.asp" target="_top">China-Pub 计算机绝版图书按需印刷服务</a><br>
</div>


<div id="div_commentbox_nav" class="c_ad_block">
链接：<a href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html?switchskin=1#skinlist">切换模板</a><br>
</div>
<div id="relative_search"><br><b>相关搜索:</b><br> <a href="http://zzk.cnblogs.com/s?w=.NET" target="_top">.NET</a> </div><div id="relative_search"><br><b>在知识库中查看：</b><br> <a href="http://kb.cnblogs.com/a/1336052/">Log4net日志记录组件-学习心得</a></div>

</div>




				
			</div>
		</td>
	</tr>
	<tr>
		<td colspan="2" class="FooterCell">
			
<p id="footer">
	Powered by: 
	<br>
	
	<a id="Footer1_Hyperlink3" name="Hyperlink1" href="http://www.cnblogs.com/" style="font-family: Verdana; font-size: 12px;">博客园</a>
	<br>
	Copyright © suhanyu
</p>

		</td>
	</tr>
</tbody></table>
<div id="lefttemp" style="display: none;">
	
		
<div id="Cal">
<img src="icon-group.jpg" align="left" hspace="5" vspace="2"><h3>日历</h3>
<table id="Calendar1_entryCal" class="cal" title="Calendar" style="border-width: 0px; height: 160px; border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0">
	<tbody><tr><td colspan="7" style="background-color: rgb(238, 238, 238);"><table class="cal" style="color: rgb(102, 102, 102); font-size: 13px; font-weight: bold; width: 100%; border-collapse: collapse;" border="0" cellspacing="0">
		<tbody><tr><td style="width: 15%;" valign="bottom"><a href="javascript:__doPostBack('Calendar1$entryCal','V3196')" style="color: Black;" title="Go to the previous month">&lt;</a></td><td style="width: 70%;" align="center">2008年11月</td><td style="width: 15%;" align="right" valign="bottom"><a href="javascript:__doPostBack('Calendar1$entryCal','V3257')" style="color: Black;" title="Go to the next month">&gt;</a></td></tr>
	</tbody></table></td></tr><tr><th abbr="日" scope="col" style="background-color: rgb(221, 221, 204); font-size: 12px;" align="center">日</th><th abbr="一" scope="col" style="background-color: rgb(221, 221, 204); font-size: 12px;" align="center">一</th><th abbr="二" scope="col" style="background-color: rgb(221, 221, 204); font-size: 12px;" align="center">二</th><th abbr="三" scope="col" style="background-color: rgb(221, 221, 204); font-size: 12px;" align="center">三</th><th abbr="四" scope="col" style="background-color: rgb(221, 221, 204); font-size: 12px;" align="center">四</th><th abbr="五" scope="col" style="background-color: rgb(221, 221, 204); font-size: 12px;" align="center">五</th><th abbr="六" scope="col" style="background-color: rgb(221, 221, 204); font-size: 12px;" align="center">六</th></tr><tr><td style="color: Gray; font-size: 11px; width: 14%;" align="center">26</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">27</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">28</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">29</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">30</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">31</td><td style="font-size: 11px; width: 14%;" align="center">1</td></tr><tr><td style="font-size: 11px; width: 14%;" align="center">2</td><td style="font-size: 11px; width: 14%;" align="center">3</td><td style="font-size: 11px; width: 14%;" align="center">4</td><td style="font-size: 11px; width: 14%;" align="center">5</td><td style="font-size: 11px; width: 14%;" align="center">6</td><td style="font-size: 11px; width: 14%;" align="center">7</td><td style="font-size: 11px; width: 14%;" align="center">8</td></tr><tr><td style="font-size: 11px; width: 14%;" align="center">9</td><td style="font-size: 11px; width: 14%;" align="center">10</td><td style="font-size: 11px; width: 14%;" align="center">11</td><td style="font-size: 11px; width: 14%;" align="center">12</td><td style="font-size: 11px; width: 14%;" align="center">13</td><td style="font-size: 11px; width: 14%;" align="center">14</td><td style="font-size: 11px; width: 14%;" align="center">15</td></tr><tr><td style="font-size: 11px; width: 14%;" align="center">16</td><td style="font-size: 11px; width: 14%;" align="center">17</td><td style="font-size: 11px; width: 14%;" align="center"><a href="http://www.cnblogs.com/shyblog/archive/2008/11/18.html"><u>18</u></a></td><td style="font-size: 11px; width: 14%;" align="center"><a href="http://www.cnblogs.com/shyblog/archive/2008/11/19.html"><u>19</u></a></td><td style="font-size: 11px; width: 14%;" align="center">20</td><td style="font-size: 11px; width: 14%;" align="center">21</td><td style="font-size: 11px; width: 14%;" align="center">22</td></tr><tr><td style="font-size: 11px; width: 14%;" align="center">23</td><td style="font-size: 11px; width: 14%;" align="center">24</td><td style="font-size: 11px; width: 14%;" align="center">25</td><td style="font-size: 11px; width: 14%;" align="center">26</td><td style="font-size: 11px; width: 14%;" align="center">27</td><td style="font-size: 11px; width: 14%;" align="center">28</td><td style="font-size: 11px; width: 14%;" align="center">29</td></tr><tr><td style="font-size: 11px; width: 14%;" align="center">30</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">1</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">2</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center"><a href="http://www.cnblogs.com/shyblog/archive/2008/12/3.html"><u>3</u></a></td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">4</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">5</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">6</td></tr>
</tbody></table>
</div>

		
<div id="cell">
<img src="icon-group.jpg" align="left" hspace="5" vspace="2"><h3>公告</h3>
<div id="news">
	<div id="profile_block"><a href="http://home.cnblogs.com/shyblog/" target="_top">我的主页</a>&nbsp; <a href="http://home.cnblogs.com/shyblog/detail/" target="_top">个人资料</a><br><a href="http://home.cnblogs.com/shyblog/ing/" target="_top">我的闪存</a>&nbsp; <a href="http://space.cnblogs.com/msg/send/suhanyu" target="_top">发短消息</a></div>
</div>
</div>

	
	

<div id="cell">
<img src="icon-group.jpg" align="left" hspace="5" vspace="2">
<h3 class="catListTitle">搜索</h3>
<div class="div_my_zzk"><input value="" id="q" onkeydown="return zzk_go_enter(event);" class="input_my_zzk" type="text">&nbsp;<input onclick="zzk_go()" value="找找看" id="btnZzk" class="btn_my_zzk" type="button"></div>
<div class="div_my_zzk"><input value="" name="google_q" id="google_q" onkeydown="return google_go_enter(event)" class="input_my_zzk" type="text">&nbsp;<input onclick="google_go()" value="Google搜索" class="btn_my_zzk" type="button"></div>
</div>
<div class="ad_side">
<ul style="margin-left: 0px;"><li>
<div>

<ins style="border: medium none ; margin: 0pt; padding: 0pt; display: inline-table; height: 150px; position: relative; visibility: visible; width: 180px;"><ins style="border: medium none ; margin: 0pt; padding: 0pt; display: block; height: 150px; position: relative; visibility: visible; width: 180px;"><iframe allowtransparency="true" hspace="0" id="google_ads_frame3" marginheight="0" marginwidth="0" name="google_ads_frame" src="index_4.html" style="left: 0pt; position: absolute; top: 0pt;" vspace="0" scrolling="no" frameborder="0" height="150" width="180"></iframe></ins></ins>
</div></li></ul>
</div>
<div id="cell">
<img src="icon-group.jpg" align="left" hspace="5" vspace="2">
<h3>常用链接</h3>
<ul>

		<li><a id="Singlecolumn2_ctl03_rptMainLinks_ctl00_lnkLinkItem" href="http://www.cnblogs.com/shyblog/MyPosts.html">我的随笔</a></li>
	
		<li><a id="Singlecolumn2_ctl03_rptMainLinks_ctl01_lnkLinkItem" href="http://home.cnblogs.com/shyblog/">我的空间</a></li>
	
		<li><a id="Singlecolumn2_ctl03_rptMainLinks_ctl02_lnkLinkItem" href="http://space.cnblogs.com/msg/recent">我的短信</a></li>
	
		<li><a id="Singlecolumn2_ctl03_rptMainLinks_ctl03_lnkLinkItem" href="http://www.cnblogs.com/shyblog/MyComments.html">我的评论</a></li>
	
<li><a id="itemListLink" onclick="this.blur();WarpClass('itemListLink', 'itemListLin_con');return false;" href="#">更多链接</a></li>
</ul>
<div id="itemListLin_con" style="display: none;">
<ul>
		<li><a id="Singlecolumn2_ctl03_repeaterLinks_ctl01_lnkLinkItem" href="http://www.cnblogs.com/shyblog/OtherPosts.html">我的参与</a></li>
	
		<li><a id="Singlecolumn2_ctl03_repeaterLinks_ctl02_lnkLinkItem" href="http://www.cnblogs.com/shyblog/MyNews.html">我的新闻</a></li>
	
		<li><a id="Singlecolumn2_ctl03_repeaterLinks_ctl03_lnkLinkItem" href="http://www.cnblogs.com/shyblog/RecentComments.html">最新评论</a></li>
	
		<li><a id="Singlecolumn2_ctl03_repeaterLinks_ctl04_lnkLinkItem" href="http://www.cnblogs.com/shyblog/tag/">我的标签</a></li>
	</ul>
</div>
</div>
<div id="cell">
<img src="icon-group.jpg" align="left" hspace="5" vspace="2">
<h3>我的标签</h3>
<div id="MyTag">
<ul>
<li><a href="http://www.cnblogs.com/shyblog/tag/Asp%ef%bf%a5net/">Asp.net(4)</a></li><li><a href="http://www.cnblogs.com/shyblog/tag/GridView/">GridView(3)</a></li><li><a href="http://www.cnblogs.com/shyblog/tag/%e6%9d%82%e8%b0%88/">杂谈(1)</a></li><li><a href="http://www.cnblogs.com/shyblog/tag/%ef%bf%a5NET/">.NET(1)</a></li><li><a href="http://www.cnblogs.com/shyblog/tag/AJAX/">AJAX(1)</a></li><li><a href="http://www.cnblogs.com/shyblog/tag/%e7%a7%91%e6%8a%80%e6%97%a5/">科技日(1)</a></li>
</ul>
</div>
</div>
		<div id="cell">
		<img src="icon-group.jpg" align="left" hspace="5" vspace="2"><h3>随笔分类</h3>
		
				<ul>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl00_LinkList_ctl01_RssLink" title="Subscribe to 转载(1)" href="http://www.cnblogs.com/shyblog/category/164110.html/rss"><img title="Subscribe to 转载(1)" src="xmlsmall.gif" style="border-width: 0px;"></a><a id="Singlecolumn2_Categories_CatList_ctl00_LinkList_ctl01_Link" href="http://www.cnblogs.com/shyblog/category/164110.html">转载(1)</a>
				</li>
			
				</ul>
			</div>
	
		<div id="cell">
		<img src="icon-group.jpg" align="left" hspace="5" vspace="2"><h3>随笔档案</h3>
		
				<ul>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl01_Link" href="http://www.cnblogs.com/shyblog/archive/2009/01.html">2009年1月 (1)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl02_Link" href="http://www.cnblogs.com/shyblog/archive/2008/12.html">2008年12月 (1)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl03_Link" href="http://www.cnblogs.com/shyblog/archive/2008/11.html">2008年11月 (7)</a>
				</li>
			
				</ul>
			</div>
	
		<div id="cell">
		<img src="icon-group.jpg" align="left" hspace="5" vspace="2"><h3>新闻分类</h3>
		
				<ul>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl02_LinkList_ctl01_RssLink" title="Subscribe to 财经" href="http://www.cnblogs.com/shyblog/category/164099.html/rss"><img title="Subscribe to 财经" src="xmlsmall.gif" style="border-width: 0px;"></a><a id="Singlecolumn2_Categories_CatList_ctl02_LinkList_ctl01_Link" href="http://www.cnblogs.com/shyblog/category/164099.html">财经</a>
				</li>
			
				</ul>
			</div>
	
		<div id="cell">
		<img src="icon-group.jpg" align="left" hspace="5" vspace="2"><h3>新闻档案</h3>
		
				<ul>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl03_LinkList_ctl01_Link" href="http://www.cnblogs.com/shyblog/news/2008/11.html">2008年11月 (1)</a>
				</li>
			
				</ul>
			</div>
	
		<div id="cell">
		<img src="icon-group.jpg" align="left" hspace="5" vspace="2"><h3>相册</h3>
		
				<ul>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl04_LinkList_ctl01_Link" href="http://www.cnblogs.com/shyblog/gallery/164056.html">长江七号</a>
				</li>
			
				</ul>
			</div>
	
		<div id="cell">
		<img src="icon-group.jpg" align="left" hspace="5" vspace="2"><h3>MY友情网站</h3>
		
				<ul>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl05_LinkList_ctl01_Link" href="http://youwing.com/" target="_top">毕业生网站</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl05_LinkList_ctl02_Link" href="http://chinastockadvice.com/" target="_top">中华证券资讯网</a>
				</li>
			
				</ul>
			</div>
	

<div id="cell">
<img src="icon-group.jpg" align="left" hspace="5" vspace="2"><h3>最新评论
	<a id="Singlecolumn2__41ae9766d9b8_RSSHyperlink1" href="http://www.cnblogs.com/shyblog/CommentsRSS.aspx"><img src="xml.gif" style="border-width: 0px;"></a></h3>
<div class="RecentComment">
	
			<ul>
		
			<li style="">
				<a id="Singlecolumn2__41ae9766d9b8_CommentList_ctl01_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/19/1336580.html#1486036">1.&nbsp;re: AjaxPro实现无刷新模仿MSN提示消息功能</a>
			</li>
			<li style="">
				&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="MessageShow.aspx...
			</li>
			<li style="text-align: right; margin-right: 4px;">
				--soarfe</li>
		
			<li style="">
				<a id="Singlecolumn2__41ae9766d9b8_CommentList_ctl02_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#1384144">2.&nbsp;re: Log4net日志记录组件-学习心得</a>
			</li>
			<li style="">
				博主的下载链接是错的哈，应该是
log4net好像很久没发布新版本了，目前最新的版本是1.2.10 ，
看源代码好像是基于.net framework 1.1 写的，用vs2005打开解决方案的时候，...
			</li>
			<li style="text-align: right; margin-right: 4px;">
				--Cheese</li>
		
			<li style="">
				<a id="Singlecolumn2__41ae9766d9b8_CommentList_ctl03_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#1380242">3.&nbsp;re: Log4net日志记录组件-学习心得</a>
			</li>
			<li style="">
				如何动态更改日志文件输出路径.
<br>通常应用程序都会有个日志输出路径供用户配置.
<br>这个在log4net如何实现?
			</li>
			<li style="text-align: right; margin-right: 4px;">
				--XMLSpy</li>
		
			<li style="">
				<a id="Singlecolumn2__41ae9766d9b8_CommentList_ctl04_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/19/1336782.html#1376040">4.&nbsp;re: 支付模块提交xml数据</a>
			</li>
			<li style="">
				恩,写的过于简单了
			</li>
			<li style="text-align: right; margin-right: 4px;">
				--xjb</li>
		
			<li style="">
				<a id="Singlecolumn2__41ae9766d9b8_CommentList_ctl05_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html#1375992">5.&nbsp;re: Log4net日志记录组件-学习心得</a>
			</li>
			<li style="">
				我觉得挺好的，现在正在学习中……
			</li>
			<li style="text-align: right; margin-right: 4px;">
				--鹏鹏_Lovely</li>
		
			</ul>
		
</div>
</div>

<div id="cell">
<img src="icon-group.jpg" align="left" hspace="5" vspace="2"><h3>阅读排行榜</h3>
<div class="RecentComment">
	
			<ul style="">
		
			<li>
				<a id="Singlecolumn2__1d75c0c4b129_TopList_ctl01_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html">1.&nbsp;Log4net日志记录组件-学习心得(2502)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__1d75c0c4b129_TopList_ctl02_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/19/1336782.html">2.&nbsp;支付模块提交xml数据(1748)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__1d75c0c4b129_TopList_ctl03_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1335693.html">3.&nbsp;TabContainer动态添加TabPanel,TabPanel动态添加HeaderTemplate,ContentTemplate(878)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__1d75c0c4b129_TopList_ctl04_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2009/01/15/1376214.html">4.&nbsp;gridview 绑定数据源 SqlDataSource 实现增加修改删除功能(547)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__1d75c0c4b129_TopList_ctl05_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1335975.html">5.&nbsp;GridView中超链接的使用(292)</a>
			</li>
		
			</ul>
		
</div>
</div>

<div id="cell">
<img src="icon-group.jpg" align="left" hspace="5" vspace="2"><h3>评论排行榜</h3>
<div class="RecentComment">
	
			<ul style="">
		
			<li>
				<a id="Singlecolumn2__36493206242a_TopList_ctl01_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1336052.html">1.&nbsp;Log4net日志记录组件-学习心得(14)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__36493206242a_TopList_ctl02_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/19/1336782.html">2.&nbsp;支付模块提交xml数据(5)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__36493206242a_TopList_ctl03_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/19/1336580.html">3.&nbsp;AjaxPro实现无刷新模仿MSN提示消息功能(1)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__36493206242a_TopList_ctl04_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1335693.html">4.&nbsp;TabContainer动态添加TabPanel,TabPanel动态添加HeaderTemplate,ContentTemplate(1)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__36493206242a_TopList_ctl05_Hyperlink1" href="http://www.cnblogs.com/shyblog/archive/2008/11/18/1335625.html">5.&nbsp;Sun科技日 -北京 (0)</a>
			</li>
		
			</ul>
		
</div>
</div>

</div>

    </form>
	
	
      
    
    
    
</body>
</html>
